package com.kingdee.eas.custom.bpmworkflow.cbbill.finanContractBill;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;



public abstract class AbstractContractforRZKJRequestFacadeControllerBean extends AbstractBizControllerBean implements ContractforRZKJRequestFacadeController
{
    protected AbstractContractforRZKJRequestFacadeControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("5DABA0E8");
    }

    public String createBillXML(Context ctx, String billid, String type) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("90cc7bde-dc45-4d11-9319-b00a6d8a7553"), new Object[]{ctx, billid, type});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)_createBillXML(ctx, billid, type);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String _createBillXML(Context ctx, String billid, String type) throws BOSException
    {    	
        return null;
    }

    public void saveBPMWorkFlow(Context ctx, String billid, String procInstId, String procURL, String success) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("9372b675-edf8-493f-b90d-e92029acf546"), new Object[]{ctx, billid, procInstId, procURL, success});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _saveBPMWorkFlow(ctx, billid, procInstId, procURL, success);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void _saveBPMWorkFlow(Context ctx, String billid, String procInstId, String procURL, String success) throws BOSException
    {    	
        return;
    }

    public String startBPMWorkFlow(Context ctx, String billid, String type) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("56b84877-d31f-4bd4-a4ba-0d304e47ed28"), new Object[]{ctx, billid, type});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)_startBPMWorkFlow(ctx, billid, type);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String _startBPMWorkFlow(Context ctx, String billid, String type) throws BOSException
    {    	
        return null;
    }

    public String stopBPMWorkFlow(Context ctx, String billid) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("37ace0e5-f506-4b48-986e-8b1eda39feaa"), new Object[]{ctx, billid});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)_stopBPMWorkFlow(ctx, billid);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String _stopBPMWorkFlow(Context ctx, String billid) throws BOSException
    {    	
        return null;
    }

    public void updateBillState(Context ctx, String billid, int state, String auditorNum) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("8b0e0258-211c-4898-80a5-8299ce7a8bfa"), new Object[]{ctx, billid, new Integer(state), auditorNum});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _updateBillState(ctx, billid, state, auditorNum);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void _updateBillState(Context ctx, String billid, int state, String auditorNum) throws BOSException
    {    	
        return;
    }

    public String viewBPMWorkFlow(Context ctx, String billid) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("0ca4c044-2be1-4c93-97c5-faf9f3d43a42"), new Object[]{ctx, billid});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)_viewBPMWorkFlow(ctx, billid);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String _viewBPMWorkFlow(Context ctx, String billid) throws BOSException
    {    	
        return null;
    }

}